<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Basic Test Suite</title>
    <script src="http://g.tbcdn.cn/kissy/k/1.3.1/seed-min.js"></script>
    <!-- <script src="../node_modules/kissy/build/seed-min.js"></script> -->
    <!-- Load local QUnit. -->
    <link rel="stylesheet" href="../node_modules/grunt-contrib-qunit/test/libs/qunit.css" media="screen">
    <script src="../node_modules/grunt-contrib-qunit/test/libs/qunit.js"></script>
    <!-- Load local lib and tests. -->
    <script src="../dist/mock.js"></script>
</head>
<body>
    <script type="text/javascript">
        var tpl = Mock.heredoc(function(){
            /*
{{#with data}}
  {{#if n > ../limit/5.0}}
    {{n+1.0}}
  {{/if}}
{{/with}}

{{#each comments}}
  {{author}}: {{body}}
{{/each}}

<!-- Mock
{
  author: '@NAME',
  body: '@SENTENCE'
}
-->
            */
        })

        test('mock4xtpl', function() {
            stop()
            KISSY.use('xtemplate', function(S, XTemplate) {
                var ast = XTemplate.compiler.parse(tpl)
                var data = Mock.xtpl(ast)
                ok(data.comments.length)
                start()
            })
        })
        
    </script>

    <div id="qunit"></div>
    <div id="qunit-fixture"></div>
</body>
</html>
